package com.niit.musicserve.service.impl;

import com.niit.musicserve.dao.AlbumMapper;
import com.niit.musicserve.entity.Album;
import com.niit.musicserve.service.AlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AlbumServiceImpl implements AlbumService {
	
	@Autowired
	private AlbumMapper albumMapper;
	
	
	@Override
	public int addAlbum(Album album) {
		return albumMapper.addAlbum(album);
	}
	
	@Override
	public int deleteAlbum(int albumId) {
		return albumMapper.deleteAlbum(albumId);
	}
	
	@Override
	public int updateAlbum(Album album) {
		return albumMapper.updateAlbum(album);
	}
	
	@Override
	public List<Album> allAlbum() {
		return albumMapper.allAlbum();
	}
	
	@Override
	public Album albumOfId(int albumId) {
		return albumMapper.albumOfId(albumId);
	}
	
	@Override
	public List<Album> albumOfName(String albumName) {
		return albumMapper.albumOfName(albumName);
	}
}
